
// NurProofs.java

package com.ruoyi.hospital.entity.check;

import com.ruoyi.service.domain.ServicePicture;

import java.util.ArrayList;
import java.util.List;

/**
 * 护士的证明材料
 */
@lombok.Data
public class CheckNurProofs {
    /**
     * 图片数组
     */
    private ArrayList<String> photos;
    /**
     * 证明的备注文本
     */
    private String remarks = "";

    public void init(List<ServicePicture> pictures, List<ServicePicture> remarks) {
        if(pictures == null){
            this.setPhotos(new ArrayList<String>());
        }
        for (ServicePicture picture : pictures) {
            if (photos == null){
                photos = new ArrayList<String>();
            }
            photos.add(picture.getPicturePic());
        }
        for (ServicePicture remark : remarks){
            this.setRemarks(this.getRemarks() + " ; \n" + remark.getPictureRemark());
        }

    }
}
